// 从模型文件导入基础类型
import type { MatchPredictEurope18wan, PaginationInfo, PaginationRequest } from "@/models/matchPredictEurope18wan"

// 欧洲18万数据响应模型
export interface MatchPredictEurope18wanResponseData {
  code: number
  message: string
  data: MatchPredictEurope18wan[] | null
  pagination: PaginationInfo
}

// 欧洲18万数据查询条件类型（用于API调用）
export interface MatchPredictEurope18wanApiCondition {
  current_page?: number
  page_size?: number
  event_name?: string | null
  season_id?: number | null
  homeid?: number | null
  awayid?: number | null
  status?: string | null
  order_num?: string | null
  homesxname?: string | null
  awaysxname?: string | null
  
  // 日期范围字段
  ownerdate_s?: string | null
  ownerdate_e?: string | null
  matchtime_s?: string | null
  matchtime_e?: string | null
  
  // 比分范围字段
  homescore_min?: number | null
  homescore_max?: number | null
  awayscore_min?: number | null
  awayscore_max?: number | null
  
  // 初始赔率范围字段
  home_initial_min?: number | null
  home_initial_max?: number | null
  draw_initial_min?: number | null
  draw_initial_max?: number | null
  away_initial_min?: number | null
  away_initial_max?: number | null
  
  is_setting_range?: number | null
}

// 欧洲赔率数据模型
export interface FootballEuropeOdds {
  id?: number
  fid: number
  company_id: number
  home_odds: number | null
  draw_odds: number | null
  away_odds: number | null
  create_time: string | null
}

// 欧洲赔率响应模型
export interface FootballEuropeOddsResponse {
  code: number
  message: string
  data: FootballEuropeOdds[] | null
}

// 欧洲赔率查询条件
export interface FootballEuropeOddsCondition {
  fid: number
}

// 欧洲293-18万数据模型
export interface MatchPredictEurope29318wan {
  id: number
  matchtime: string | null
  event_name: string | null
  homesxname: string | null
  homescore: number | null
  awayscore: number | null
  awaysxname: string | null
  home_initial: number | null
  draw_initial: number | null
  away_initial: number | null
  home_final: number | null
  draw_final: number | null
  away_final: number | null
}

// 欧洲293-18万数据响应模型
export interface MatchPredictEurope29318wanResponse {
  code: number
  message: string
  data: MatchPredictEurope29318wan[] | null
  pagination: PaginationInfo
}

// 欧洲293-18万数据查询条件
export interface MatchPredictEurope29318wanApiCondition {
  current_page?: number
  page_size?: number
  event_name?: string | null
  homesxname?: string | null
  awaysxname?: string | null
  
  // 比分范围字段
  homescore_min?: number | null
  homescore_max?: number | null
  awayscore_min?: number | null
  awayscore_max?: number | null
  
  // 初始赔率范围字段
  home_initial_min?: number | null
  home_initial_max?: number | null
  draw_initial_min?: number | null
  draw_initial_max?: number | null
  away_initial_min?: number | null
  away_initial_max?: number | null
  
  // 最终赔率范围字段
  home_final_min?: number | null
  home_final_max?: number | null
  draw_final_min?: number | null
  draw_final_max?: number | null
  away_final_min?: number | null
  away_final_max?: number | null
}

// 最值设置模型
export interface MatchesEurope18wMinMax {
  fid: number
  home_odds_min: number | null
  home_odds_max: number | null
  draw_odds_min: number | null
  draw_odds_max: number | null
  away_odds_min: number | null
  away_odds_max: number | null
}

// 最值设置更新请求
export interface MatchesEurope18wMinMaxUpdateRequest {
  fid: number
  home_odds_min: number | null
  home_odds_max: number | null
  draw_odds_min: number | null
  draw_odds_max: number | null
  away_odds_min: number | null
  away_odds_max: number | null
}

// 最值设置响应
export interface MatchesEurope18wMinMaxResponse {
  code: number
  message: string
  data: MatchesEurope18wMinMax | null
}

// 分析结果统计模型
export interface AnalysisResultStats {
  total_matches: number
  home_wins: number
  draws: number
  away_wins: number
  home_win_rate: number
  draw_rate: number
  away_win_rate: number
  home_initial?: number | null
  theory_home_initial?: number | null
  home_diff?: number | null
  draw_initial?: number | null
  theory_draw_initial?: number | null
  draw_diff?: number | null
  away_initial?: number | null
  theory_away_initial?: number | null
  away_diff?: number | null
}

// 分析结果模型
export interface AnalysisResult {
  stats: AnalysisResultStats
  matches: MatchPredictEurope29318wan[]
}


// 合理性分析条件模型
export interface SameEurope293AnalysisCondition extends PaginationRequest {
  event_name?: string | null
  fid?: number | null
  status: string | null
  // 范围查询字段
  home_diff_min?: number | null
  home_diff_max?: number | null
  draw_diff_min?: number | null
  draw_diff_max?: number | null
  away_diff_min?: number | null
  away_diff_max?: number | null
}

// v_293_init_same_europe_final表模型
export interface V293InitSameEuropeFinal {
  event_name: string | null
  fid: number
  homesxname: string | null
  awaysxname: string | null
  matchtime : string | null
  home_initial: number | null
  theory_home_initial: number | null
  home_diff: number | null
  draw_initial: number | null
  theory_draw_initial: number | null
  draw_diff: number | null
  away_initial: number | null
  theory_away_initial: number | null
  away_diff: number | null
  return_rate: number | null
  total_matches: number | null
  home_win_count: number | null
  draw_count: number | null
  away_win_count: number | null
  home_win_rate: number | null
  draw_rate: number | null
  away_win_rate: number | null
  
  status: string | null
  homescore: string | null
  awayscore: string | null
  
}

// v_293_init_same_europe_final表响应模型
export interface V293InitSameEuropeFinalResponse {
  code: number
  message: string
  data: V293InitSameEuropeFinal[] | null
  pagination: PaginationInfo
}

// 欧洲18万返回测试统计数据查询条件类型
export interface MatchPredictEurope18wReturnTestStatisticsCondition {
  event_name?: string | null
  
  // 初始赔率范围字段
  home_initial_min?: number | null
  home_initial_max?: number | null
  draw_initial_min?: number | null
  draw_initial_max?: number | null
  away_initial_min?: number | null
  away_initial_max?: number | null
  
  // 赔率差值范围字段
  home_diff_min?: number | null
  home_diff_max?: number | null
  draw_diff_min?: number | null
  draw_diff_max?: number | null
  away_diff_min?: number | null
  away_diff_max?: number | null
}

// 欧洲18万返回测试统计数据类型
export interface MatchPredictEurope18wReturnTestStatistics {
  total_matches: number
  home_wins: number
  draws: number
  away_wins: number
  home_win_rate: number
  draw_rate: number
  away_win_rate: number
}

// 欧洲18万返回测试统计数据响应类型
export interface MatchPredictEurope18wReturnTestStatisticsResponse {
  code: number
  message: string
  data: MatchPredictEurope18wReturnTestStatistics | null
}
